<div class="alunos index">
	<h2><?php echo __('Usuários');?></h2>
	
	<div class="actions">
		<?php echo $this->Form->create();?>
		<?php echo $this->Form->input('id_alunos', array('label'=>'Código', 'type'=>'text'));?>
		<?php echo $this->Form->input('email');?>
		<?php echo $this->Form->input('nome');?>
		<?php echo $this->Form->submit('Buscar');?>
	</div>
	
	<?php if(empty($alunos)){?>
	
	<div class=no-results>Não existe nenhum resultado a ser exibido</div>
	
	<?php }else{?>
	<div class="pagging">
		<p>
		<?php
		echo $this->Paginator->counter(array(
		'format' => __('Página {:page} de {:pages}, mostrando {:current} registros de um total de {:count}')
		));
		?>	</p>
	</div>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th><?php echo $this->Paginator->sort('id_alunos', 'Código');?></th>
			<th><?php echo $this->Paginator->sort('nome');?></th>
			<th><?php echo $this->Paginator->sort('email', 'E-mail');?></th>
			<th width="80px"></th>
	</tr>
	<?php
	$i = 0;
	foreach ($alunos as $aluno): ?>
	<?php if($i%2==0)$class="even";else $class='odd'?>
	<tr class="<?php echo $class;?>">
		<td><?php echo h($aluno['Aluno']['id_alunos']); ?>&nbsp;</td>
		<td><?php echo h($aluno['Aluno']['nome']); ?>&nbsp;</td>
		<td><?php echo h($aluno['Aluno']['email']); ?>&nbsp;</td>
		<td>
			<?php echo $this->Html->image(
									"actions/info.png", array(
										'url'=>array( 'action' => 'info', $aluno['Aluno']['id_alunos']),
										'alt'=>__('Detalhes'),
										'title'=>__('Detalhes')
									)
								); ?>
			<?php echo $this->Html->image(
									"actions/edit.png", array(
										'url'=>array('action' => 'editar', $aluno['Aluno']['id_alunos']),
										'alt'=>__("Editar"),
										'title'=>__("Editar"),
									)); ?>
			<?php echo $this->Form->postLink($this->Html->image(
									"actions/delete.png", array(
										'alt'=>__("Apagar"),
										'title'=>__("Apagar"),
									)),
									array('action' => 'apagar', $aluno['Aluno']['id_alunos']),
									array('escape'=>false),
									__('Deseja excluir %s?', $aluno['Aluno']['id_alunos']));
									?>
		</td>
	</tr>
	<?php $i++;?>
<?php endforeach; ?>
	</table>
	<div class="pagging">
		<div>
		<?php
			echo $this->Paginator->prev( __('Anterior'), array(), null, array('class' => 'prev disabled'));
			echo $this->Paginator->numbers(array('separator' => ''));
			echo $this->Paginator->next(__('Próximo') , array(), null, array('class' => 'next disabled'));
		?>
		</div>
	</div>
	<?php }?>
</div>